package pers.lan.stack;

/**
 * @author <p><a href="mailto:1728209643@qq.com">XiaoSan</a>
 * @date 2019/9/3 12:35 PM
 */
public class LC_1003 {


    public boolean isValid(String S) {
        while (S.length() != 0 && S.contains("abc")) {
            S = S.replaceAll("abc", "");
        }
        return S.length() == 0;
    }
}
